<template>
  <div>
    <h1>鼠标位置的获取</h1>
    <p>x:{{ point.x }} |y:{{ point.y }}</p>
    <button @click.stop="reset">重置</button>
    <p v-if="isLoding">Loding</p>
    <div v-else>
        <img :src="imgUrl" alt="">
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "About",
});
</script>

<script setup lang="ts">
import useLoading from './hooks/useLoding'
import useMousePoint from '@/views/hooks/useMousePoint'
const {isLoding,imgUrl} = useLoading()
const {point,reset} = useMousePoint()
</script>